const form = [{
    key: 'dh',
    label: '代号',
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
}, {
    key: 'wg',
    label: '外观',
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
},{
    key: 'hsl',
    label: '含水率%',
    validatorNumber:true,
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
}, {
    key: 'hgl',
    label: '含固量%',
    validatorNumber:true,
    labelWidth: 80,
    required: true,
    placeholder: '请填写'
}, {
    key: 'xd',
    label: '细度',
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
},{
    key: 'md',
    label: '密度（g/m3）',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
}, {
    key: 'llzhl',
    label: '氯离子含量%',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
}, {
    key: 'ph',
    label: 'PH值',
    labelWidth: 80,
    required: false,
    placeholder: '请填写'
},{
    key: 'csbslb',
    label: '初始保水率比%',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
},{
    key: 'cshql',
    label: '初始含气量%',
    validatorNumber:true,
    labelWidth: 180,
    required: false,
    placeholder: '请填写'
},{
    key: 'hql1hbhl',
    label: '含气量1h变化量%',
    validatorNumber:true,
    labelWidth: 180,
    required: false,
    placeholder: '请填写'
},{
    key: 'bssj',
    label: '保塑时间（h）',
    validatorNumber:true,
    labelWidth: 160,
    required: true,
    placeholder: '请填写'
},{
    key: 'cdssl',
    label: '稠度损失率%',
    validatorNumber:true,
    labelWidth: 160,
    required: true,
    placeholder: '请填写'
},{
    key: 'njlsqdb',
    label: '14d粘结拉升强度比%',
    validatorNumber:true,
    labelWidth: 180,
    required: false,
    placeholder: '请填写'
},{
    key: 'kyqdb',
    label: '28d抗压强度比%',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
},{
    key: 'sslb',
    label: '28d收缩率比%',
    validatorNumber:true,
    labelWidth: 160,
    required: false,
    placeholder: '请填写'
},{
    key: 'zxbz',
    label: '执行标准',
    labelWidth: 80,
    required: true,
    placeholder: '请填写'
}]


const requiredArr = []
const notRequiredArr = []

let tempArr = []
form.forEach(item => {
    if(item.required) {
        tempArr.push(item)
    }else {
        notRequiredArr.push(item)
    }
    if( tempArr.length >= 2 ) {
        requiredArr.push(tempArr)
        tempArr = []
    }
})

if( tempArr.length > 0 ) {
    requiredArr.push(tempArr)
    tempArr = []
}

export default {
    requiredArr,
    notRequiredArr
};